<template>
  <el-row class="header-container">
    <el-col :span="6" :offset="3">
      <div class="logo">
        <img src="../assets/images/logo.svg" alt="" />
        <h3>个人简介网站</h3>
      </div>
    </el-col>
    <el-col :span="6" :offset="6">
      <el-menu
        :default-active="activeIndex"
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        background-color="#545c64"
        text-color="#fff"
        active-text-color="#ffd04b"
      >
        <el-menu-item index="1"><a>首页</a></el-menu-item>
        <el-menu-item index="2"><a href="#info">基本资料</a></el-menu-item>
        <el-menu-item index="3"><a href="#skill">个人技能</a></el-menu-item>
        <el-menu-item index="4"><a href="#contact">联系我</a></el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>
  
  <script>
export default {
  data() {
    return {
      activeIndex: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
  
  <style lang="less" scoped>
.header-container {
  background-color: #545c64;
  height: 60px;
  line-height: 60px;
  .logo {
    display: flex;
    align-items: center;
    width: 100%;
    height: 60px;
    line-height: 60x;
    img {
      height: 38px;
    }
    h3 {
      font-size: 20px;
      color: #ffffff;
    }
  }
}
.el-menu-item{
  a{
    display: inline-block;
    width: 100%;
    height: 100%;
    text-decoration: none;
  }
}
</style>